package cn.hznc.controller.service.process.logic;

import cn.hznc.domain.entity.ProcessBomEntity;
import lombok.Getter;
import lombok.Setter;

import java.util.ArrayList;
import java.util.List;

/**
 *
 *
 * @Author Administrator
 * @Date 2023/3/16 9:04
 */
@Getter
@Setter
public class ProcessBomDo {
    private List<ProcessBomEntity> createElement= new ArrayList<>();
    private List<ProcessBomEntity> deleteElement= new ArrayList<>();
    private List<ProcessBomEntity> updateElement= new ArrayList<>();


    /**
     * 添加新增的原素
     *
     * @param element element
     * @return boolean
     */
    public boolean addCreateElement(ProcessBomEntity element){
        return createElement.add(element);
    }

    /**
     * 添加新增的原素
     *
     * @param element element
     * @return boolean
     */
    public boolean addCreateElement(List<ProcessBomEntity> element){
        return createElement.addAll(element);
    }

    /**
     * 添加删除的元素
     *
     * @param element element
     * @return boolean
     */
    public boolean addDeleteElement(ProcessBomEntity element){
        return deleteElement.add(element);
    }

    /**
     * 添加删除的元素
     *
     * @param element element
     * @return boolean
     */
    public boolean addDeleteElement(List<ProcessBomEntity> element){
        return deleteElement.addAll(element);
    }

    /**
     * 添加新增的原素
     *
     * @param element element
     * @return boolean
     */
    public boolean addUpdateElement(ProcessBomEntity element){
        return updateElement.add(element);
    }

}
